__date__ = '2018/6/10 18:58'
__author__ = 'zhourudong'

from django.urls import path
from . import views, services_views, product_line_views

urlpatterns = [
    path('idcs/create', views.IdcCreateView.as_view(), name='idc_create'),
    path('idcs/', views.IdcListView.as_view(), name='idc_list'),
    path('idcs/<str:pk>/update/', views.IdcUpdateView.as_view(), name='idc_update'),
    path('idcs/<str:pk>/delete/', views.IdcDeleteView.as_view(), name='idc_delete'),

    path('hosts/', views.HostListView.as_view(), name='host_list'),
    path('hosts/create', views.HostCreateView.as_view(), name='host_create'),
    path('hosts/<str:pk>/update/', views.HostUpdateView.as_view(), name='host_update'),
    path('hosts/<str:pk>/detail/', views.HostDetailView.as_view(), name='host_detail'),
    path('hosts/<str:pk>/delete/', views.HostDeleteView.as_view(), name='host_delete'),

    path('services/', services_views.ServicesListView.as_view(), name='services_list'),
    path('services/create', services_views.ServicesCreateView.as_view(), name='services_create'),
    path('services/<str:pk>/create/', services_views.ServicesUpdateView.as_view(), name='services_update'),
    path('services/<str:pk>/delete/', services_views.ServicesDeleteView.as_view(), name='services_delete'),

    path('product_lines/', product_line_views.ProductLineListView.as_view(), name='product_lines_list'),
    path('product_lines/create/', product_line_views.ProductLineCreateView.as_view(), name='product_lines_create'),
    path('product_lines/<str:pk>/create/', product_line_views.ProductLineUpdateView.as_view(),
         name='product_lines_update'),

    path('t/', views.T.as_view(), name='t'),

    path('projects/create/', views.ProjectCreateView.as_view(), name='project_create'),
    path('projects/', views.ProjectListView.as_view(), name='project_list'),
    path('projects/<int:pk>/update/', views.ProjectUpdateView.as_view(), name='project_update'),
    path('projects/<int:pk>/delede/', views.ProjectDeleteView.as_view(), name='project_delete'),

    path('select/', views.seaech_host_by_node_name, ),  # todo  待优化

]
